﻿@{
    ViewBag.Title = "index";
    Layout = "~/Views/Shared/_Index.cshtml";
    string icoUrl = "~/Content/img/ico/";
    string jsUrl = "~/Content/js/workflow/";
}
@section Content{
    <style>
        .topPanel .toolbar {
            position: absolute;
            left: 10px;
        }

         .panel .toolbar {
            height:50px;
            line-height:50px;
            border:1px solid #ddd;
        }

        .toolbar a span {
            padding: 0 18px;
            display: inline-block;           
        }
        .toolbar a {
            cursor: pointer;
        }
        .toolbar a:hover {            
            color:rgba(0, 0, 0, 0.85);
        } 
        .toolbar span.split {
            position: relative;
            border-right: 1px solid #c9c9c9;
            height: 16px;
            margin-left: 5px;
            margin-right: 5px;
            margin-top: 8px;
        }
    </style>
    <script src="@Url.Content(jsUrl+"draw-min.js")" type="text/javascript"></script>
    <script src="@Url.Content(jsUrl+"workflow.js")" type="text/javascript"></script>
    <script type="text/javascript">
            var appid = '@Request.QueryString["appid"]';
            var iframeid = '@Request.QueryString["tabid"]';
            var dialog = top.mainDialog;
    </script>
}
<div class="topPanel">
    <div class="toolbar" style="margin-top:0; border-top:none 0;">
        <a href="#" onclick="openFlow(); return false;">
            <span style="background:url(@Url.Content(icoUrl+"folder_classic.png")) no-repeat left center;">打开</span>
        </a>
        <a href="#" onclick="addFlow(); return false;">
            <span style="background:url(@Url.Content(icoUrl+"folder_classic_add.png")) no-repeat left center;">新建</span>
        </a>
        <a href="#" onclick="flowAttrSetting(); return false;">
            <span style="background:url(@Url.Content(icoUrl+"hammer_screwdriver.png")) no-repeat left center;">属性</span>
        </a>

        <span class="toolbarsplit">&nbsp;</span>

        <a href="#" onclick="addStep(); return false;">
            <span style="background:url(@Url.Content(icoUrl+"shape_aling_left.png")) no-repeat left center;">新步骤</span>
        </a>
        <!--
        <a href="#" onclick="addSubFlow(); return false;">
            <span style="background:url(@Url.Content(icoUrl + "shape_aling_center.png")) no-repeat left center;">子流程</span>
        </a>
        -->
        <a href="#" onclick="addConn(); return false;">
            <span style="background:url(@Url.Content(icoUrl+"vector.png")) no-repeat left center;">连线</span>
        </a>
        <!--a href="#" onclick="copyStep(); return false;">
            <span style="background:url(/images/ico/ui_saccordion.png) no-repeat left center;">复制</span>
        </a-->
        <a href="#" onclick="removeObj(); return false;" title="删除当前选定对象">
            <span style="background:url(@Url.Content(icoUrl+"cross.png")) no-repeat left center;">删除</span>
        </a>
        <span class="toolbarsplit">&nbsp;</span>

        <a href="#" onclick="saveFlow('save'); return false;">
            <span style="background:url(@Url.Content(icoUrl+"save.gif")) no-repeat left center;">保存</span>
        </a>
        <a href="#" onclick="saveAs(); return false;">
            <span style="background:url(@Url.Content(icoUrl+"saveas.gif")) no-repeat left center;">另存为</span>
        </a>

        <span class="toolbarsplit">&nbsp;</span>

        <a href="#" onclick="saveFlow('install'); return false;">
            <span style="background:url(@Url.Content(icoUrl+"folder_classic_up.png")) no-repeat left center;">安装</span>
        </a>
        <a href="#" onclick="saveFlow('uninstall'); return false;">
            <span style="background:url(@Url.Content(icoUrl+"folder_classic_down.png")) no-repeat left center;">卸载</span>
        </a>
        <a href="#" onclick="saveFlow('delete'); return false;" title="删除流程">
            <span style="background:url(@Url.Content(icoUrl+"folder_classic_stuffed_remove.png")) no-repeat left center;">删除</span>
        </a>
    </div>    
</div>    
<div id="flowdiv" style="margin:0; padding:0;"></div>
